package com.ccsoft.atools.service;

import com.ccsoft.atools.dao.LifeScheduleMapper;
import com.ccsoft.atools.model.LifeSchedule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName:LifeScheduleServiceImpl
 * @Description:TODO
 * @Author:chanchaw
 * @Date:2020-01-13 21:08
 * @Version:1.0
 **/
@Service
public class LifeScheduleServiceImpl implements LifeScheduleService {

    @Autowired
    private LifeScheduleMapper dao;

    @Override
    public int deleteByPrimaryKey(Integer iid) {
        return dao.deleteByPrimaryKey(iid);
    }

    @Override
    public int insert(LifeSchedule record) {
        return dao.insert(record);
    }

    @Override
    public LifeSchedule insertSelective(LifeSchedule record) {
        dao.insertSelective(record);
        return selectByPrimaryKey(record.getIid());
    }

    @Override
    public LifeSchedule selectByPrimaryKey(Integer iid) {
        return dao.selectByPrimaryKey(iid);
    }

    @Override
    public LifeSchedule updateByPrimaryKeySelective(LifeSchedule record) {
        dao.updateByPrimaryKeySelective(record);
        return selectByPrimaryKey(record.getIid());
    }

    @Override
    public LifeSchedule updateByPrimaryKey(LifeSchedule record) {
        dao.updateByPrimaryKey(record);
        return selectByPrimaryKey(record.getIid());
    }

    @Override
    public List<LifeSchedule> selectAll() {
        return dao.selectAll();
    }
}
